﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExpertOldEmpVerify.aspx.cs" Inherits="RN.ERP.Web.Expert.ExpertOldEmpVerify" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>老专家信息</title>
    <link rel="Stylesheet" type="text/css" href="../Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <link rel="Stylesheet" type="text/css" href="../Styles/skins/blue/css/style.css" />
    <link rel="Stylesheet" type="text/css" href="../Styles/skins/blue/css/style_msg.css" />
    <style>
        .IE6png{behavior: url("js/iepngfix.htc");}
        #btnSend{padding: 5px 10px;background: rgb(255, 199, 56);margin-left: 10px;}
        #btnSend.disabled{background:lightgray;color:Gray;}
    </style>
</head>
<body>
    <form id="form2" runat="server">
    <div class="main_tt">
        <div class="main_tt_r_p15">
            <!--title_tt 开始-->
            <div class="title_tt">
                <div class="title_tt_l">
                    <img src="../images/tt_title_l.jpg" width="9" height="33" />
                    <img src="../images/xx_icon.jpg" width="24" height="33" />
                </div>
                <div class="title_tt_h">老专家信息</div>
                <a href="../LoginExpert.aspx" style="position: absolute;right: 38px;color: white;">返回首页</a>
                <div class="title_tt_r">
                    <img src="../images/tt_title_r.jpg" width="9" height="33" />
                </div>
            </div>
            <!--title_tt 结束-->

            <!--userinfo_tt 开始-->
            <div class="userinfo_tt">
                <div id="sendVerCodePage">
                    <div class="xian">
                        <div class="about_title">专家身份信息确认</div>
                    </div>
                    <div  class="userinfo_tt_left">
                        <ul>
                        <li>
                                <label>专家证号</label>
                                <span> 
                                    <asp:DropDownList ID="Emp_CerdentialsType" runat="server" style="width:60px; float:left; margin-right:10px; margin-top:5px;">
                                        <asp:ListItem Value="AFS">AFS</asp:ListItem>
                                        <asp:ListItem Value="ZS">ZS</asp:ListItem>
                                        <asp:ListItem Value="LDT">LDT</asp:ListItem>
                                    </asp:DropDownList>
                                </span>
                                <span class="input_l"><img src="../images/input_l.jpg" width="10" height="31" alt="" /></span>
                                <span class="input_mm" style=" width:133px;"><input id="txtCerdentialsCode" type="text" class="inp" maxlength="10" /></span>
                                <span class="input_r"><img src="../images/input_r.jpg" width="10" height="31" alt="" /></span>
                                <span style="color:Red; padding-left:10px; line-height:31px;">(山东省建设工程评标专家证号)</span>
                            </li>
                            <li>
                                <label>手机号码</label>
                                <span class="input_l"><img src="../images/input_l.jpg" width="10" height="31" alt="" /></span>
                                <span class="input_mm"><input id="txtPhone" type="password" class="inp" maxlength="11" /></span>
                                <span class="input_r"><img src="../images/input_r.jpg" width="10" height="31" alt="" /></span>
                                <span style="color:Red; padding-left:10px; line-height:31px;">(本人在专家库中登记的手机号码)</span>
                            </li>
                            <li>
                                <label>&nbsp;</label>
                                <span class="ckicon02"><a id="btnToChangePwd" style="text-decoration:none;" href="###">确认</a></span>
                            </li>
                        </ul>
                    </div>

                <div class="clear"></div>
            </div>
            <!--userinfo_tt 结束-->
        </div>
    </div>
    </form>

    <script src="../Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="../Scripts/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
    <script title="common">
        var validitor = {
            //手机号
            phone: function (p) {
                return /^1[3-8]\d{9}$/.test(p);
            }
            , CerdentialsCode: function (c) {
                return /^(((AFS|ZS)\d{9,10})|(LDT\d{6}))$/i.test(c);
            }
            , pwd: function (p) {
                var patrn = /^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]{6,}$/;
                return !!patrn.exec(p);
            }
        };
    </script>
    <script type="text/javascript">

        //点击【确认】
        $("#btnToChangePwd").click(function () {
            var phoneNum, CerdentialsCode;
            phoneNum = $.trim($("#txtPhone").val());
            if (phoneNum == "") {
                $.ligerDialog.warn("请输入手机号码");
                return;
            } else if (!validitor.phone(phoneNum)) {
                $.ligerDialog.warn("请输入正确的手机号码");
                return;
            }

            CerdentialsCode = $("#Emp_CerdentialsType").val() + $.trim($("#txtCerdentialsCode").val());

            if (!validitor.CerdentialsCode(CerdentialsCode)) {
                $.ligerDialog.warn("请输入正确的专家证号");
                return;
            }

            $.ajax({
                type: "post",
                cache: false,
                dataType: 'text',
                url: '../Handlers/LoginExpertHandler.ashx',
                data: { functype: "OldEmp", phone: phoneNum, CerdentialsCode: CerdentialsCode },
                success: function (data) {
                    if (data == "success") {
                        window.location.href = "RegisterExpertGLD.aspx";
                    } else {
                        var htm = $("<div style='font-size:17px;padding:5px;line-height:29px;color:#666;'></div>")
                            .html("您输入的专家证号和手机号已进行确认或不正确。如已确认，请使用身份证号和密码登录。<br/>如本人未进行确认，请联系市招办！");
                        $.ligerDialog.open({ target: htm, width: 300 });
                    }
                },
                beforeSend: function () {
                    $.ligerDialog.waitting("<div style='line-height:29px;font-size:17px;padding:5px;color:#666;'>正在确认……</div>");
                },
                complete: function () {
                    $.ligerDialog.closeWaitting();
                }
            });
        });
    </script>
</body>
</html>
